import { ApiProperty } from '@nestjs/swagger';
import { IsEnum, IsOptional, IsString } from 'class-validator';
import { PagerDto } from '~/common/dto/pager.dto';
import { FeedbackStatus, FeedbackType } from '../feedback.entity';

export class FeedbackPageDto extends PagerDto {
  @ApiProperty({ description: '反馈类型', enum: FeedbackType, required: false })
  @IsOptional()
  @IsEnum(FeedbackType)
  type?: FeedbackType;

  @ApiProperty({ description: '反馈状态', enum: FeedbackStatus, required: false })
  @IsOptional()
  @IsEnum(FeedbackStatus)
  status?: FeedbackStatus;

  @ApiProperty({ description: '反馈内容（模糊查询）', required: false })
  @IsOptional()
  @IsString()
  content?: string;

  @ApiProperty({ description: '用户ID', required: false })
  @IsOptional()
  userId?: number;
}